package cn.tedu.cwgl.service.impl;

import cn.tedu.cwgl.entity.Privilege;
import cn.tedu.cwgl.mapper.PrivilegeMapper;
import cn.tedu.cwgl.service.PrivilegeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PrivilegeServiceImpl implements PrivilegeService {

    @Resource
    private PrivilegeMapper privilegeMapper;

    @Override
    public List<Privilege> getPrivilegeByRoleid(int roleid) {
        return this.privilegeMapper.getPrivilegeByRoleid(roleid);
    }

    @Override
    public int addDefaultPrivilegeWhenAddRole(String roleid) {
        return privilegeMapper.addDefaultPrivilegeWhenAddRole(roleid);
    }
}
